package com.wcgksoft.entity.Patrol;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wcgksoft.entity.ConstructionTeam.ConstructionTeam;
import org.hibernate.annotations.Cascade;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @ClassName PatrolAccount
 * @Description
 * @Author user
 * @Date 2020/3/17 11:16
 * @Version V1.0
 **/
@Entity
@Table(name = "T_patrolAccount")
public class PatrolAccount {

    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Integer id;

    /**
     * 施工id
     */
    @OneToOne(fetch = FetchType.EAGER,optional=true)
    @JoinColumn(name = "constructionTeam_id")
    @Cascade({org.hibernate.annotations.CascadeType.REFRESH})
    private ConstructionTeam constructionTeam;

    /**
    *  信息来源
    * */
    @Column(name = "source")
    private String source;

    /**
    *  问题情况
    * */
    @Column(name = "situation")
    private String situation;

    /**
    *   发布时间
    * */
    @Column(name = "publishTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date publishTime;

    /**
     * 坐标点
     * */
    @Column(name = "pointList",length = 10000)
    private String pointList;

    @Column(name = "receiver")
    private String receiver;

    /**
     * 要求完成时间
     * */
    @Column(name = "completeTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date completeTime;

    /**
     *  问题接收方id
     * */
    @Column(name = "receiverId")
    private String receiverId;

    /**
     * 施工队完成时间
     * */
    @Column(name = "constructionTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date constructionTime;

    /**
     * 完成状态 0-已完成按时 1-已完成超时 2-未完成
     * */
    @Column(name = "status")
    private String status;

    /**
     * 备注
     * */
    @Column(name = "remark")
    private String remark;

    /**
     * 施工说明
     * */
    @Column(name = "caption")
    private String caption;

    /**
     * 录入人id
     * */
    @Column(name = "typeId")
    private Integer typeId;

    /**
     * 企业id
     * */
    @Column(name = "enterpriseId")
    private Integer enterpriseId;


    /**
     * 添加人
     */
    @Column(name = "maintenanceTroops")
    private String maintenanceTroops;

    /**
     * 绿地表Id
     */
    @Column(name = "urisId")
    private Integer urisId;

    /**
     * 区域id
     */
    @Column(name = "areaId")
    private Integer areaId;

    @Column(name = "proId")
    private Integer proId;

    /**
     * 绿地名称
     */
    @Column(name = "greenName")
    private String greenName;


    /**
     * 区域名称
     */
    @Column(name = "areaName")
    private String areaName;

    /**
     * 巡查问题表
     */
    @Transient
    private List<PatrolImage> patrolImages=new ArrayList<>();

    /**
     * 完成巡查图片
     */
    @Transient
    private List<CompletePatrolImage> completePatrolImageList=new ArrayList<>();

    public String getGreenName() {
        return greenName;
    }

    public void setGreenName(String greenName) {
        this.greenName = greenName;
    }

    public Integer getProId() {
        return proId;
    }

    public void setProId(Integer proId) {
        this.proId = proId;
    }

    public List<CompletePatrolImage> getCompletePatrolImageList() {
        return completePatrolImageList;
    }


    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public void setCompletePatrolImageList(List<CompletePatrolImage> completePatrolImageList) {
        this.completePatrolImageList = completePatrolImageList;
    }

    public List<PatrolImage> getPatrolImages() {
        return patrolImages;
    }

    public void setPatrolImages(List<PatrolImage> patrolImages) {
        this.patrolImages = patrolImages;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public ConstructionTeam getConstructionTeam() {
        return constructionTeam;
    }

    public void setConstructionTeam(ConstructionTeam constructionTeam) {
        this.constructionTeam = constructionTeam;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSituation() {
        return situation;
    }

    public void setSituation(String situation) {
        this.situation = situation;
    }

    public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    public String getPointList() {
        return pointList;
    }

    public void setPointList(String pointList) {
        this.pointList = pointList;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public String getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(String receiverId) {
        this.receiverId = receiverId;
    }


    public Date getConstructionTime() {
        return constructionTime;
    }

    public void setConstructionTime(Date constructionTime) {
        this.constructionTime = constructionTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCaption() {
        return caption;
    }

    public void setCaption(String caption) {
        this.caption = caption;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public Integer getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(Integer enterpriseId) {
        this.enterpriseId = enterpriseId;
    }


    public String getMaintenanceTroops() {
        return maintenanceTroops;
    }

    public void setMaintenanceTroops(String maintenanceTroops) {
        this.maintenanceTroops = maintenanceTroops;
    }

    public Integer getUrisId() {
        return urisId;
    }

    public void setUrisId(Integer urisId) {
        this.urisId = urisId;
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }
}
